<template>
  <div class="welcome_container">
    欢迎进入
    <p>请点击左侧菜单栏进行操作</p>
    <p>如有问题联系微信110</p>
    <p>当前时间是:{{ getTime }} {{ getday }}</p>
  </div>
</template>
<script>
export default {
  data() {
    return {
      getTime: new Date().toLocaleString()
    };
  },
  created() {
    this.getTimes();
  },
  methods: {
    getTimes() {
      setInterval(() => {
        this.getTime = new Date().toLocaleString();
      }, 1000);
    }
  },
  computed: {
    getday() {
      let list = [
        "星期日",
        "星期一",
        "星期二",
        "星期三",
        "星期四",
        "星期五",
        "星期六"
      ];
      return list[new Date().getDay()];
    }
  }
};
</script>
<style lang="less" scope>
.welcome_container {
  width: 400px;
  height: 400px;
  background: orange;
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
  border-radius: 50%;
  box-shadow: 0 10px 10px brown;
  padding: 20px;
  box-sizing: border-box;
}
p {
  padding: 0;
  margin: 0;
  margin-top: 30px;
}
</style>